package com.jash.labor.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jash.labor.entity.Station;
import com.jash.labor.mapper.provider.SqlProvider;
import com.jash.labor.mapper.provider.sqlStationProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

@Mapper
@Repository
public interface StationMapper extends BaseMapper<Station> {
    @SelectProvider(value = SqlProvider.class,method = "laborQueryStationList")
    public IPage<HashMap> laborQueryStationList(Page page, String content);
    //查询历史岗位详情
    @Select("SELECT s.name,s.recr_time_start,s.recr_time_end,f.name,f.address,s.salary_start,s.salary_end FROM first_party f,station s WHERE f.id =s.first_party_id and s.id =${companyid};")
    public List<HashMap> queryHistoricalPositionDetails(Integer companyid);

    @Select("SELECT company_id f_id,`name` from first_party f")
    public List<HashMap> companyQueryStationList(String content);

    //查询历史岗位
    @SelectProvider(value = sqlStationProvider.class,method = "HistoricalPositionList")
     IPage<HashMap> HistoricalPositionList(Page page,String companyid);

}
